package com.example.tiku2.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.example.tiku2.VpFragment;

import java.util.ArrayList;

public class VpFragmentAdapter extends FragmentPagerAdapter {
    private ArrayList<VpFragment> vpFragments;

    public VpFragmentAdapter(FragmentManager fm, ArrayList<VpFragment> vpFragments) {
        super(fm);
        this.vpFragments = vpFragments;
    }

    @Override
    public Fragment getItem(int i) {
        return vpFragments.get(i);
    }

    @Override
    public int getCount() {
        return vpFragments.size();
    }

}
